Skip to content

add links to profile on like dialog - #28

Merged
KianBaghai merged 1 commit into
mainfrom
feed-page-updates
Dec 2, 2025
Merged

add links to profile on like dialog#28
KianBaghai merged 1 commit into
mainfrom
feed-page-updates

Conversation

@KianBaghai

Copy link
Copy Markdown
Collaborator
  • clicking like on a username on like dialog redirects to that users gallery

@vercel

vercel Bot commented Dec 2, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
memento Ready Ready Preview Comment Dec 2, 2025 4:56am

@KianBaghai
KianBaghai requested a review from Copilot December 2, 2025 04:57
@KianBaghai
KianBaghai merged commit 4bc20f3 into main Dec 2, 2025
5 checks passed
@KianBaghai
KianBaghai deleted the feed-page-updates branch December 2, 2025 04:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds clickable username links in the likes dialog that navigate users to the profile gallery of the person who liked a post. This improves user experience by allowing direct navigation to user profiles from the likes list.

  • Converted static username text to interactive buttons with navigation functionality
  • Added button styling with hover effects and transitions
  • Integrated Next.js router for client-side navigation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
client/app/feed/components/likesDialog.jsx Replaced username <span> with <button> element and added router navigation to user profiles
client/app/feed/components/likesDialog.module.css Added button reset styles, hover states, and visual feedback for clickable usernames

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

className={styles.avatar}
/>
<span className={styles.username}>{displayName}</span>
<button

Copilot AI Dec 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button is missing the type="button" attribute. Without this, the button defaults to type="submit" which could cause unexpected form submission behavior if this component is rendered within a form context. Add type="button" to make the button's purpose explicit.

Suggested change
<button
<button
type="button"

Copilot uses AI. Check for mistakes.
<span className={styles.username}>{displayName}</span>
<button
className={styles.username}
onClick={() => router.push(`/${displayName}`)}

Copilot AI Dec 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button lacks an accessible label. Screen reader users will only hear the username text but won't know that clicking will navigate to the user's profile. Add an aria-label attribute like aria-label={View ${displayName}'s profile} to provide context about what the button does.

Suggested change
onClick={() => router.push(`/${displayName}`)}
onClick={() => router.push(`/${displayName}`)}
aria-label={`View ${displayName}'s profile`}

Copilot uses AI. Check for mistakes.
<span className={styles.username}>{displayName}</span>
<button
className={styles.username}
onClick={() => router.push(`/${displayName}`)}

Copilot AI Dec 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The navigation doesn't close the dialog. When a user clicks a username, they're navigated to the profile but the dialog remains open, which creates a poor UX. Consider calling onClose() before or after the navigation: onClick={() => { onClose(); router.push(\/${displayName}`); }}`

Suggested change
onClick={() => router.push(`/${displayName}`)}
onClick={() => { onClose(); router.push(`/${displayName}`); }}

Copilot uses AI. Check for mistakes.
color: #7a6e60;
text-decoration: underline;
}

Copilot AI Dec 2, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a focus state for keyboard navigation accessibility. Add a .username:focus style (similar to :hover) to ensure keyboard users can see which username button has focus: .username:focus { outline: 2px solid #7a6e60; outline-offset: 2px; }

Suggested change
.username:focus {
outline: 2px solid #7a6e60;
outline-offset: 2px;
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants